local SceneBase = class("SceneBase", function()
	return display.newScene()
end)

function SceneBase:ctor(data)

    self.vCustomListeners = { }     --监听事件表

    self:enableNodeEvents()
end

function SceneBase:onEnter()
	self:onUpdate(handler(self, self.Update))
end

function SceneBase:onExit()
    self:unscheduleUpdate()
end

function SceneBase:Update(dt)

end

function SceneBase:initUI()
    self.white_bg = display.newSprite("UI/bg/white_bg.jpg")
    td.AddRelaPos(self,self.white_bg)
    self.bg = display.newSprite("UI/bg/bg.jpg")
    self.bg:setOpacity(50)
    td.AddRelaPos(self,self.bg)
end

function SceneBase:AddDispatchEvent(name, func)       --添加消息监听，消息名称，触发回调
	local customListener = require("app.event.EventDispatcher"):GetInstance():AddEventListener(name, func)
    table.insert(self.vCustomListeners, customListener)
    --td.dispatchEvent(_eName, _data)   --发送消息方法
end

return SceneBase